package com.wchen.gdoc.generate.resource;

import com.alibaba.fastjson.JSONObject;
import com.wchen.gdoc.generate.resource.loader.JavaDocScanningProvider;
import com.wchen.gdoc.generate.resource.structure.ClassStructure;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;

/**
 * 默认资源加载
 *
 * @author  wchen
 * @date    2019/11/11
 */
public class DefaultResourceLoader implements ResourceLoader {
    private final static Logger LOGGER = LoggerFactory.getLogger(DefaultResourceLoader.class);


    /**
     * 加载资源
     *
     * @return
     */
    @Override
    public List<ClassStructure> loadResource() {
        List<ClassStructure> classStructures = JavaDocScanningProvider.getClassStructures();
        LOGGER.info(String.format("loadResource end, size is %s ", classStructures.size()));
        return classStructures;
    }

}
